package cpt202.project.entity;

import java.io.Serializable;

public class Record implements Serializable {     //来自bookData表
    private Integer recordId;
    private Double price;
    private Integer inOut;  // 0 or 1   0是收入， 1 是支出
    private String time;      //由于不清楚Date的具体格式目前先用Integer代替
    private String type;    //具体类型
    private String remark;    //备注
    private Integer bookUid;    //来自book表

    public Record() {
    }

    public Record(Double price, Integer inOut, String time, String type, Integer bookUid) {
        this.price = price;
        this.inOut = inOut;
        this.time = time;
        this.type = type;
        this.bookUid = bookUid;
    }

    public Record(Double price, Integer inOut, String time, String type, String remark, Integer bookUid) {
        this.price = price;
        this.inOut = inOut;
        this.time = time;
        this.type = type;
        this.remark = remark;
        this.bookUid = bookUid;
    }

    public Record(Integer recordId, Double price, Integer inOut, String time, String type, String remark, Integer bookUid) {
        this.recordId = recordId;
        this.price = price;
        this.inOut = inOut;
        this.time = time;
        this.type = type;
        this.remark = remark;
        this.bookUid = bookUid;
    }
    public Record(Integer recordId, Double price, Integer inOut, String time, String type, Integer bookUid) {
        this.recordId = recordId;
        this.price = price;
        this.inOut = inOut;
        this.time = time;
        this.type = type;
        this.bookUid = bookUid;
    }

    public Integer getRecordId() {
        return recordId;
    }

    public void setRecordId(Integer recordId) {
        this.recordId = recordId;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getInOut() {
        return inOut;
    }

    public void setInOut(Integer inOut) {
        this.inOut = inOut;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }


    public Integer getBookUid() {
        return bookUid;
    }

    public void setBookUid(Integer bookUid) {
        this.bookUid = bookUid;
    }

    @Override
    public String toString() {
        return "Record{" +
                "recordId=" + recordId +
                ", price=" + price +
                ", inOut=" + inOut +
                ", time='" + time + '\'' +
                ", type='" + type + '\'' +
                ", remark='" + remark + '\'' +
                ", bookUid=" + bookUid +
                '}';
    }

}
